java list addAll stream() filtereted

51

java list addAll stream() filtereted -

List<Person> beerDrinkers = persons.stream()
    .filter(p -> p.getAge() > 16).collect(Collectors.toList());

Comments

Submit
0 Comments